﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace l1cs_cl.client.receivepackets
{
    class R_CharPack : ReceiveBasePacket
    {
        public R_CharPack( byte[] abyte0 )
            : base( abyte0 )
        {
            Data.Instance.activeCharacter.x = readH();
            Data.Instance.activeCharacter.y = readH();
            Data.Instance.activeCharacter.id = readD();
            int getTempCharGfxAtDead = readH(); // ToDo: 死んでるかどうか？
            int getStatus = readC(); // ToDo: 死んでるステータス？
            Data.Instance.activeCharacter.heading = readC(); // ● 向き 0.左上 1.上 2.右上 3.右 4.右下 5.下 6.左下 7.左
            Data.Instance.activeCharacter.lightSize = readC();//readC( pc.getOwnLightSize() );
            Data.Instance.activeCharacter.moveSpeed = readC();//readC( pc.getMoveSpeed() );
            Data.Instance.activeCharacter.exp = readD();//readD( pc.getExp() );
            Data.Instance.activeCharacter.lawful= readH();//readH( pc.getLawful() );
            Data.Instance.activeCharacter.name = readS();//readS( pc.getName() );
            Data.Instance.activeCharacter.title = readS();//readS( pc.getTitle() );
            Data.Instance.activeCharacter.status = readC();//readC( status );
            Data.Instance.activeCharacter.clanid = readD();//readD( pc.getClanid() );
            Data.Instance.activeCharacter.clanName = readS();//readS( pc.getClanname() ); // クラン名
            readS();//readS( null ); // ペッホチング？
            readC();//readC( 0 ); // ？
            //if ( pc.isInParty() ) // パーティー中
            //{
            //    readC( 100 * pc.getCurrentHp() / pc.getMaxHp() );
            //}
            //else
            //{
            //    readC( 0xFF );
            //}
            readC(); // isInParty()
            readC();//readC( 0 ); // タルクック距離(通り)
            readC();//readC( 0 ); // PC = 0, Mon = Lv
            readC();//readC( 0 ); // ？
            readC();//readC( 0xFF );
            readC();//readC( 0xFF );
        }
    }
}
